package com.hlx.entiry.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultVO {
	private Integer ok;
	private String msg;
	private Object data;

	private ResultVO(Integer ok, String msg){
		this.ok = ok;
		this.msg = msg;
	}

	public static ResultVO ok() {
		return new ResultVO(1, "ok");
	}

	public static ResultVO ok(Object data) {
		return new ResultVO(1, "ok", data);
	}

	public static ResultVO fail(String msg) {
		return new ResultVO(0, msg);
	}
}
